import request from "@/utils/request";
import { download } from "@/utils/request";

// 导入xml
export function importFaultXml(data) {
  return request({
    url: "/faultTree/importFaultXml",
    method: "post",
    data,
  });
}
// 查询设备故障树 -- 上表
export function getListByCode(params) {
  return request({
    url: "/faultTree/getFaultTreeBasicData",
    method: "get",
    params,
  });
}
// 查询设备树明细 -- 下表
export function getFaultTreeData(data) {
  return request({
    url: "/faultTree/getFaultTreeData",
    method: "post",
    data,
  });
}

// 删除

export function deleteOneFaultTree(params) {
  return request({
    url: "/faultTree/delete",
    method: "get",
    params,
  });
}
// 保存
export function saveFaultTreeData(data) {
  return request({
    url: "/faultTree/saveFaultTreeData",
    method: "post",
    data,
  });
}
// 故障树修改
export function updateFaultTreeDetailById(data) {
  return request({
    url: "/faultTree/updateFaultTreeDetailById",
    method: "post",
    data,
  });
}